package megrez.oss.local.domain;

import javax.persistence.AttributeConverter;

/**
 * 文件路径属性转换
 *  
 * @author Lucky Yang
 * @since 2.6.9
 */
public class FilePathPairConverter implements AttributeConverter<FilePathPair, String> {

    @Override
    public String convertToDatabaseColumn(FilePathPair attribute) {
        return attribute.toString();
    }

    @Override
    public FilePathPair convertToEntityAttribute(String dbData) {
        return FilePathPair.withString(dbData);
    }
    
}
